import config from "@/config"
import http from "@/utils/request"

export default {
    list: {
        url: `${config.API_URL}/teacher/list-page`,
        name: "获取列表",
        get: async function (params) {
            return await http.get(this.url, params);
        }
    },
    listByName: {
        url: `${config.API_URL}/teacher/list-name`,
        name: "获取列表",
        get: async function (params) {
            return await http.get(this.url, params);
        }
    },
    listByAgent: {
        url: `${config.API_URL}/teacher/list-agent`,
        name: "获取列表",
        get: async function (params) {
            return await http.get(this.url, params);
        }
    },
    appointmentList: {
        url: `${config.API_URL}/teacher/appointment-list`,
        name: "获取可预约教练列表",
        get: async function (params) {
            return await http.get(this.url, params);
        }
    },
    timeList: {
        url: `${config.API_URL}/teacher/time-list-page`,
        name: "获取教练时间列表",
        get: async function (params) {
            return await http.get(this.url, params);
        }
    },
    action: {
        url: `${config.API_URL}/teacher`,
        name: "用户操作",
        get: async function (params) {
            return await http.get(this.url, params);
        },
        post: async function (params) {
            return await http.post(this.url, params);
        },
        put: async function (params) {
            return await http.put(this.url, params);
        }
    },
    updateStatus: {
        url: `${config.API_URL}/teacher/status`,
        name: "状态变更",
        put: async function (params) {
            return await http.put(this.url, params);
        },
    },
    audit: {
        list: {
            url: `${config.API_URL}/teacher-audit/list-page`,
            name: "获取列表",
            get: async function (params) {
                return await http.get(this.url, params);
            }
        },
        action: {
            url: `${config.API_URL}/teacher-audit`,
            name: "用户操作",
            get: async function (params) {
                return await http.get(this.url, params);
            },
            delete: async function (params) {
                return await http.delete(this.url, params);
            }
        },
    },
    title: {
        list: {
            url: `${config.API_URL}/teacher-title/list-page`,
            name: "获取列表",
            get: async function (params) {
                return await http.get(this.url, params);
            }
        },
        all: {
            url: `${config.API_URL}/teacher-title/all`,
            name: "获取所有",
            get: async function (params) {
                return await http.get(this.url, params);
            }
        }
    },
    salary: {
        list: {
            url: `${config.API_URL}/teacher-salary/list-page`,
            name: "教练薪资管理列表",
            get: async function (params) {
                return await http.get(this.url, params);
            }
        },
        listCalculate: {
            url: `${config.API_URL}/teacher-salary/list-calculate`,
            name: "教练薪资计算列表",
            get: async function (params) {
                return await http.get(this.url, params);
            }
        },
        calculateInfo: {
            url: `${config.API_URL}/teacher-salary/calculate-info`,
            name: "教练薪资计算明细",
            get: async function (params) {
                return await http.get(this.url, params);
            }
        },
        action: {
            url: `${config.API_URL}/teacher-salary`,
            name: "用户操作",
            post: async function (params) {
                return await http.post(this.url, params);
            }
        }
    },
    rest: {
        list: {
            url: `${config.API_URL}/teacher-rest/list-page`,
            name: "获取列表",
            get: async function (params) {
                return await http.get(this.url, params);
            }
        }
    },
    schedule: {
        list: {
            url: `${config.API_URL}/teacher-schedule/month-list`,
            name: "获取列表",
            get: async function (params) {
                return await http.get(this.url, params);
            }
        },
        action: {
            url: `${config.API_URL}/teacher-schedule`,
            name: "用户操作",
            post: async function (params) {
                return await http.post(this.url, params);
            },
            delete: async function (params) {
                return await http.delete(this.url, params);
            }
        },
    }

}